<style type="text/css">
    @media (max-width: 375px) {
        .edit-form tr td input{width:100%;}
        .edit-form tr th:first-child,.edit-form tr td:first-child{
            width:20%;
        }
        .edit-form tr th:last-child,.edit-form tr td:last-child{
            display: none;
        }
    }
</style>
<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <div class="panel-lead">
            请先完成商家资料，通过审核后才能发布任务哦
        </div>        
        <div class="panel-lead">
        <?php if($data['cert_status'] == 2):?>
            <span style="font-size: 14px; font-weight: bold;">拒绝理由：</span><span style="color:red;">{$data['refusal_reason']}</span>
        <?php elseif($data['cert_status'] == 0 && !empty($data['link_man'])):?>
            <span style="font-size: 14px; font-weight: bold;"><span style="color:red;">商家资料认证中，请稍后。</span>
        <?php elseif($data['cert_status'] == 1):?>
            <span style="font-size: 14px; font-weight: bold;"><span style="color:green;">商家资料认证通过。</span>
        <?php endif;?>
         </div>
        <ul class="nav nav-tabs">
            <li class="active"><a href="#basic" data-toggle="tab">完善资料</a></li>
        </ul>
    </div>

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="basic">
                <div class="widget-body no-padding">
                    <form id="basic-form" class="edit-form form-horizontal nice-validator n-default n-bootstrap" role="form1" data-toggle="validator" method="POST" action="{:url('task/setbusiness')}" novalidate="novalidate">
                        <table class="table table-striped">
                            <thead>
                                <tr>
                                    <th width="15%"></th>
                                    <th width="85%"></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>公司名称</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <input type="text" name="business_title" value="{$data['business_title']}" class="form-control" data-tip="请填写公司名称">
                                            </div>
                                            <div class="col-sm-4"></div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>公司地址</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <input type="text" name="business_address" value="{$data['business_address']}" class="form-control" data-tip="请填写公司地址">
                                            </div>
                                            <div class="col-sm-4"></div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>联系人</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <input type="text" name="link_man" value="{$data['link_man']}" class="form-control" data-tip="请填写联系人">
                                            </div>
                                            <div class="col-sm-4"></div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>联系人电话</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <input type="text" name="link_phone" value="{$data['link_phone']}" class="form-control" data-tip="请填写联系人电话">
                                            </div>
                                            <div class="col-sm-4"></div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>营业执照</td>
                                    <td>
                                        <div class="form-group">
                                        <div class="col-xs-12 col-sm-8">
                                            <div class="input-group">
                                                <input id="c-ad_img" data-rule="required" class="form-control" size="50" name="business_img" type="text" value="{$data['business_img']}">
                                                <div class="input-group-addon no-border no-padding">
                                                    <span><button type="button" id="plupload-ad_img" class="btn btn-danger plupload" data-input-id="c-ad_img" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-ad_img"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                                    <span><button type="button" id="fachoose-ad_img" class="btn btn-primary fachoose" data-input-id="c-ad_img" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                                </div>
                                                <span class="msg-box n-right" for="c-ad_img"></span>
                                            </div>
                                            <ul class="row list-inline plupload-preview" id="p-ad_img"></ul>
                                        </div>
                                    </div>
                                    </td>
                                </tr>
                            </tbody>
                            <tfoot>
                                <tr>
                                    <td></td>
                                    <td>
                                        <?php if(in_array($data['cert_status'],[0,2])):?>
                                        <button type="submit" class="btn btn-success btn-embossed">确定</button>
                                        <button type="reset" class="btn btn-default btn-embossed">重置</button>
                                        <?php endif;?>
                                    </td>
                                    <td></td>
                                </tr>
                            </tfoot>
                        </table>
                    </form>
                </div>
            </div>

        </div>
    </div>
</div>